﻿/*::selection {
  color: #fff;
  background: #bee4fd;
  text-shadow: none;
}

::-webkit-scrollbar {
  width: .3rem;
  -webkit-appearance: none;
}

::-webkit-scrollbar-track {
  background-color: transparent;
}

::-webkit-scrollbar-thumb {
  border-radius: .3rem;
  background-color: #aaa;
}*/

body {
  min-width: 300px;
  max-width: 1160px;
  margin: 0 auto;

  background: #e7eef2;

  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/*@media (min-width: 768px) {
  body {
    width: 750px;
  }
}

@media (min-width: 992px) {
  body {
    width: 970px;
  }
}

@media (min-width: 1200px) {
  body {
    width: 1170px;
  }
}*/

/* 默认样式调整 */

.markdown-body {
  margin: 30px;
  padding: 5% 4%;

  color: #57676e;
  border: 1px solid #ddd;
  border-color: #C3CCD0;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0), 0 0 10px rgba(0, 0, 0, 0.1);
}

/*.markdown-body a {
  color: #1EAEDB;
}*/

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
  margin-top: 2em;
  margin-bottom: 1em;

  font-weight: 500;
}

/* 源码显示 */

.markdown-source {
  margin: 30px;
  padding: 0;

  background: none;
}

/* 源码显示切换 */

.disabled .markdown-body,
.enabled .markdown-source {
  display: none;
}

.enabled .markdown-body,
.disabled .markdown-source {
  display: block;
}

/* 标题序号 */

/** initialize css counter */
.markdown-body {
  counter-reset: h2
}

h2 {
  counter-reset: h3
}

h3 {
  counter-reset: h4
}


/** put counter result into headings */
.markdown-body h2:before {
  content: counter(h2) '. ';
  counter-increment: h2;
  
  color: #87979e;
  
  font-size: .8em;
}

.markdown-body h3:before {
  content: counter(h2) '.' counter(h3) '. ';
  counter-increment: h3;
  
  color: #87979e;
  
  font-size: .8em;
}

.markdown-body h4:before {
  content: counter(h2) '.' counter(h3) '.' counter(h4) '. ';
  counter-increment: h4;
  
  color: #87979e;
  
  font-size: .8em;
}

/*
.markdown-body {
  counter-reset: h1
}

h1 {
  counter-reset: h2
}

h2 {
  counter-reset: h3
}

h3 {
  counter-reset: h4
}

h4 {
  counter-reset: h5
}

h5 {
  counter-reset: h6
}

.markdown-body h1:before {
  counter-increment: h1;
  content: counter(h1) '. '
}

.markdown-body h2:before {
  counter-increment: h2;
  content: counter(h1) '.' counter(h2) '. '
}

.markdown-body h3:before {
  counter-increment: h3;
  content: counter(h1) '.' counter(h2) '.' counter(h3) '. '
}

.markdown-body h4:before {
  counter-increment: h4;
  content: counter(h1) '.' counter(h2) '.' counter(h3) '.' counter(h4) '. '
}

.markdown-body h5:before {
  counter-increment: h5;
  content: counter(h1) '.' counter(h2) '.' counter(h3) '.' counter(h4) '.' counter(h5) '. '
}

.markdown-body h6:before {
  counter-increment: h6;
  content: counter(h1) '.' counter(h2) '.' counter(h3) '.' counter(h4) '.' counter(h5) '.' counter(h6) '. '
}*/

/*.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
  position: relative;
}

.markdown-body h1:before,
.markdown-body h2:before,
.markdown-body h3:before,
.markdown-body h4:before,
.markdown-body h5:before,
.markdown-body h6:before {
  position: absolute;
  right: 101%;
}

.markdown-body {
  padding-left: 7%;
}*/


/* 标题级别标记 */

@media screen {
  .markdown-body h1::after,
  .markdown-body h2::after,
  .markdown-body h3::after,
  .markdown-body h4::after,
  .markdown-body h5::after,
  .markdown-body h6::after {
    margin-left: 1em;
    padding: 3px 5px;

    transition: color .3s, border .3s;
    vertical-align: middle;

    color: #f5f5f5;
    border: 1px solid #f9f9f9;
    border-radius: 20%;

    font-size: .4em;
  }

  .markdown-body h1:hover::after,
  .markdown-body h2:hover::after,
  .markdown-body h3:hover::after,
  .markdown-body h4:hover::after,
  .markdown-body h5:hover::after,
  .markdown-body h6:hover::after {
    color: #c0c0c0;
    border-color: #e0e0e0;
  }

  .markdown-body h1::after {
    content: 'h1'
  }

  .markdown-body h2::after {
    content: 'h2'
  }

  .markdown-body h3::after {
    content: 'h3'
  }

  .markdown-body h4::after {
    content: 'h4'
  }

  .markdown-body h5::after {
    content: 'h5'
  }

  .markdown-body h6::after {
    content: 'h6'
  }
}

/* 分割线 */

@media screen {
  .markdown-body hr {
    height: 1px;
    margin: 100px 0;
  }

  .markdown-body hr:after {
    position: absolute;
    left: 50%;

    padding: 0 20px;

    content: 'MAKE IT BETTER';
    transform: translate(-50%, -50%);

    color: #aaa;
    background-color: #fff;

    font-size: 12px;
  }
}

/* 打印样式 */

@media print {
  .markdown-body {
    margin: 0;
    padding: 0;

    border: 0;
  }
}
